package com.kb.design.service;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kb.design.common.MeException;
import com.kb.design.dto.DesignProjectDTO;
import com.kb.design.entity.DesignDaily;
import com.kb.design.entity.DesignProject;
import com.kb.design.vo.DesignInfoDataVO;
import com.kb.design.vo.DetailsInfoVO;
import com.kb.design.vo.OnlineProjectData;
import com.kb.design.vo.ProjectListVO;

import java.util.List;
import java.util.Map;

/**
 * (CustomUser)表服务接口
 *
 * @author makejava
 * @since 2023-08-22 10:57:12
 */
public interface ProjectService {

    Map<String,Object> getProjectTypeCount(DesignProjectDTO designProjectDTO);
    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    DesignProject queryById(Long id);
    Map<String,Object> chartLegend(DesignProjectDTO designProjectDTO);
    List<DesignInfoDataVO> searchDesignInfoData(DesignProjectDTO designProjectDTO);

    /**
     * 分页查询
     *
     * @param designProject 筛选条件
     * @param designProject 分页对象
     * @return 查询结果
     */
    Page<ProjectListVO> queryByPage(DesignProjectDTO projectDTO);
    Page<DesignProject> queryNoOrderProject(DesignProjectDTO projectDTO);
    Page<ProjectListVO> queryProjectByDesignLeader(DesignProjectDTO projectDTO);
    Page<ProjectListVO> queryBonusByPage(DesignProjectDTO projectDTO);

    /**
     * 新增数据
     *
     * @param projectDTO 实例对象
     * @return 实例对象
     */
    void insert(DesignProjectDTO projectDTO);
    void addNoOrderProject(DesignProjectDTO projectDTO);
    void addProject(DesignProjectDTO projectDTO);
    void updateOrderData(DesignProjectDTO projectDTO);
    void updateProjectData(DesignProjectDTO projectDTO);
    void deliveryProject(DesignProject projectDTO) throws MeException;

    /**
     * 新增数据
     *
     * @param projectDTO 实例对象
     * @return 实例对象
     */
    DetailsInfoVO searchDetailsInfo(Long id);

    /**
     * 修改数据
     *
     * @param projectDTO 实例对象
     * @return 实例对象
     */
    void update(DesignProjectDTO projectDTO);

    /**
     * 查询统计信息
     *
     * @return 实例对象
     */
    void projectBindingOrder(Long projectId,Long OrderId);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    boolean deleteById(Long id);

    boolean returnOrder(Long orderId,Long projectId,String returnStatus);
    boolean termination(Long projectId);

    List<Map<String ,Object>>  searchTimeLine(Long searchId);

}
